Method for progressive JPEG image decoding

ABSTRACT

A progressive JPEG image decoding method is provided. In the decoding method, a non-zero history table and a sign table of each variable length decoding (VLD) result are recorded and used as a reference for decoding the next scan layer. The decoded coefficients are no longer directly stored in a memory so as to save the memory space. Accordingly, an image can be decoded and displayed correctly even with limited memory space.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a divisional of and claims the priority benefit ofU.S. application Ser. No. 12/138,446, filed on Jun. 13, 2008, nowpending, which claims the priority benefit of Taiwan application serialno. 96121492, filed on Jun. 14, 2007. The entirety of each of theabove-mentioned patent applications is hereby incorporated by referenceherein and made a part of this specification.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention generally relates to an image decoding method, inparticular, to a progressive JPEG image decoding method.

2. Description of Related Art

According to the joint photographic experts group (JPEG) compressiontechnique based on progressive discrete cosine transformation (DCT), animage is encoded by scanning the entire image several times so that theencoded JPEG data stream contains the data of a plurality of scanlayers. Accordingly, while decoding the image, data of all these scanlayers has to be decoded to re-establish the original image. Moreover,since each of the scan layers carries part of the characteristics of theoriginal image, the image decoded from each scan layer roughly presentsthe original image, and the quality of the decoded image is increasedalong with the number of decoded scan layers.

FIG. 1 illustrates a conventional progressive JPEG image decodingapparatus. Referring to FIG. 1, the decoding apparatus 100 includes avariable length decoding (VLD) apparatus 110, a memory apparatus 120, aninverse quantizer 130, and an inverse DCT (IDCT) apparatus 140. Thedecoding apparatus 100 processes a decoding procedure based onprogressive DCT, and the decoding procedure will be described below.

First, an encoded JPEG data is processed by the VLD apparatus 110. Sincethe information of a previous scan layer has be to referred when the VLDapparatus 110 processes each scan layer, the processing result has to bestored in the memory apparatus 120 having the same size as the image tobe used by the VLD apparatus 110 for processing the next scan layer. Allthe coefficients of a scan layer collected by the memory apparatus 120are sequentially sent to the inverse quantizer 130 and the IDCTapparatus 140 so that an inverse quantization and an IDCT are performedthereto to obtain the decoded pixels and re-establish the progressiveimage. In the method described above, the size of the image isrestricted by the memory space even though the image can present theprogressive characteristic. Accordingly, the efficiency in the usage ofthe memory space has to be improved.

A progressive JPEG image decoding method is provided by U.S. Pat. No.7,313,281, wherein some decoded pixels of an image and a non-zerohistory table are generated for each scan layer, and the decoded pixelsgenerated by each scan layer are accumulated in a predetermined order,and the non-zero history table generated by each scan layer is updated.In foregoing method, memory space is saved by referring to non-zerohistory records. However, the non-zero history records can only be usedas reference during Huffman decoding, while before accumulating thedecoded coefficients of each scan layer, the previous decoding result atthe same address still has to be referred in order to perform a power oftwo adjustment to the decoded coefficients and obtain correct decodedcoefficients.

For example, a value −9 is expressed as 11110111 in 8 binary bits.However, it is the absolute value of −9 which is encoded during Huffmanencoding, namely, |−9|=(00001001). If bits 7˜3 (among bits 0˜7) areencoded first and then the other bits are encoded one by one, the firstencoding process encodes the first 5 bits (00001) and 0 (0 is negativeand 1 is positive), the second encoding process encodes 0, the thirdencoding process encodes 0, and the fourth encoding process encodes 1.Accordingly, when a decoder receives the first data, it understands fromthe bit value 0 that this is a negative value, thus, a signed power oftwo adjustment is performed to (00001), wherein the complement of(00001) is first obtained as (11110), and a power of two calculation isthen performed to the complement (11110) to obtain (11110000). Next, theresults of the second and the third decoding processes are both 0, whichmeans the values are both null, and the result of the fourth decodingprocess is 1, which means the value is not null, then the binary valueof −1 is obtained as (11111111) according to the negative sign recordedin a sign table. However, because the bit corresponding to the scanlayer decoded in the fourth decoding process is bit 0, foregoing result(11111111) has to be shifted 0 bit leftward to obtain (111111111), whichdenotes value −1. After adding all the decoded values, the decodedcoefficient −9 is eventually obtained as(11111000)+0+0+(111111111)=(11110111) and the decoding operation iscompleted. However, in U.S. Pat. No. 7,313,281, the power of twoadjustment to the accumulated value is not provided, thus, decodingerror may be caused so that incorrect image may be presented.

SUMMARY OF THE INVENTION

Accordingly, the present invention is directed to a progressive JPEGimage decoding method, wherein a non-zero history table and a sign tableare used for replacing the decoding result of a previous scan layer sothat the usage of a memory is reduced.

The present invention provides a progressive JPEG image decoding methodsuitable for decoding a bit stream data into an image data. The bitstream data includes the data of a plurality of scan layers. Thedecoding method includes following steps: a. sequentially receiving thedata of a scan layer of the bit stream data; b. decoding the data of thescan layer into a plurality of decoded coefficients according to anon-zero history table; c. performing a signed power of two adjustmentto the decoded coefficients according to a sign table; d. updating thenon-zero history table and the sign table according to the decodedcoefficients; e. outputting the decoded coefficients.

According to an embodiment of the present invention, step b. includesperforming a run length decoding to the data of the scan layer accordingto the non-zero history table to respectively obtain the value of thedecoded coefficients, and step c. includes adding a sign to the value ofeach decoded coefficient according to the sign table and multiplying thevalue of each decoded coefficient by a power of two according to theposition of the image data bit corresponding to the currently decodedscan layer in the binary sequence.

According to an embodiment of the present invention, step e. includesperforming an inverse quantization and an inverse discrete cosinetransformation (DCT) to the decoded coefficients and outputting thedecoded coefficients converted by a converter. In addition, the decodedcoefficients are accumulated to the decoded coefficients outputpreviously.

According to an embodiment of the present invention, after step e., theprogressive JPEG image decoding method further includes determiningwhether or not a last decoded scan layer is the last scan layer, whereinif the scan layer is not the last scan layer, the decoding procedurereturns to step a. to decode the data of the next scan layer; otherwise,if the scan layer is the last scan layer, the decoding procedure isterminated.

According to an embodiment of the present invention, the accumulateddecoded coefficients are the completed image data when the data of allthe scan layers in the bit stream data has been decoded.

The present invention provides a progressive JPEG image decoding methodsuitable for decoding a bit stream data into an image data. The bitstream data includes the data of a plurality of scan layers. Thedecoding method includes following steps: a. dividing the scan layersinto a plurality of decoding areas; b. sequentially selecting one of thedecoding areas as a partial decoding area; c. sequentially receiving thedata of a scan layer of the bit stream data, decoding the data in thepartial decoding area of the scan layer according to a non-zero historytable and a sign table to output a plurality of local decodedcoefficients, and updating the non-zero history table and the signtable; d. sequentially receiving the data of a next scan layer of thebit stream data, repeating step c. to decode the data in the partialdecoding area of the next scan layer so as to output the local decodedcoefficients, and updating the non-zero history table and the sign tableuntil the data in the partial decoding areas of all the scan layers hasbeen decoded.

According to an embodiment of the present invention, step c. includesperforming an inverse quantization and an inverse DCT (IDCT) to thelocal decoded coefficients and outputting the local decoded coefficientsconverted by a converter. In addition, the local decoded coefficientsare accumulated to the local decoded coefficients output previously.

According to an embodiment of the present invention, step c. includesperforming a run length decoding to the data of the scan layer accordingto the non-zero history table to obtain the value of the decodedcoefficients and performing a signed power of two adjustment of thevalue of each decoded coefficient according to the sign table.

According to an embodiment of the present invention, in step a., thesize of the decoding areas is determined according to the size of thememory, and the same method is used for dividing each scan layer.

According to an embodiment of the present invention, step c. furtherincludes recording the last decoding address of the partial decodingarea of the scan layer as the starting point of the partial decodingarea of the next scan layer.

According to an embodiment of the present invention, before receivingthe data of the scan layer, step c. further includes: loading the lastdecoding address of the previous scan layer before decoding the data ofthe next decoding area of the scan layer, then decoding the data of thenext partial decoding area from the last decoding address, andeventually repeating foregoing steps to decode the data in the partialdecoding areas of all the scan layer and outputting the results as partof the image data.

According to an embodiment of the present invention, after step d., thedecoding method further includes: determining whether or not the data inall the decoding areas has been decoded; if there is still data to bedecoded, steps b˜d are repeated to select the next partial decoding areaof the first scan layer and decode the data thereof until the data inall the decoding areas has been decoded.

According to an embodiment of the present invention, the complete imagedata is obtained when the data in all the decoding areas of all the scanlayers in the bit stream data has been decoded.

In the present invention, a non-zero history table and a sign table areused for replacing the decoding result of a previous scan layer. Thus,there is no need to keep various decoded coefficients of the previousscan layer in the memory, so that a JPEG image can be decoded anddisplayed correctly even with limited memory space.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings are included to provide a furtherunderstanding of the invention, and are incorporated in and constitute apart of this specification. The drawings illustrate embodiments of theinvention and, together with the description, serve to explain theprinciples of the invention.

FIG. 1 illustrates a conventional progressive JPEG image decodingapparatus.

FIG. 2 is a flowchart illustrating a progressive JPEG image decodingmethod according to a first embodiment of the present invention.

FIG. 3 illustrates an example of a binary sequence according to thefirst embodiment of the present invention.

FIG. 4 is a flowchart illustrating a progressive JPEG image decodingmethod according to a third embodiment of the present invention.

DESCRIPTION OF THE EMBODIMENTS

Reference will now be made in detail to the present preferredembodiments of the invention, examples of which are illustrated in theaccompanying drawings. Wherever possible, the same reference numbers areused in the drawings and the description to refer to the same or likeparts.

In a progressive JPEG image decoding method, the data of a previous scanlayer has to be referred while decoding a scan layer, namely, during adecoding process, a memory space having the size of an image has to beused for recording the data of the previous scan layer in order todecode the current scan layer correctly. Accordingly, this methodconsumes a lot of memory space. In the present invention, a progressiveJPEG image decoding method is provided for resolve foregoing problem,wherein a non-zero history table and a sign table are recorded forreplacing the decoding result of the previous scan layer so that theusage of memory space is considerably reduced. Embodiments of thepresent invention will be described below with reference to accompanyingdrawings.

First Embodiment

FIG. 2 is a flowchart illustrating a progressive JPEG image decodingmethod according to a first embodiment of the present invention.Referring to FIG. 2, the progressive JPEG image decoding method in thepresent embodiment is suitable for decoding a bit stream data into animage data, wherein the bit stream data includes the data of a pluralityof scan layers. Below, the decoding method in the present embodimentwill be described in detail.

First, the data of a scan layer of the bit stream data is sequentiallyreceived (step S201). The scan layers are arranged in a particularorder, and in the present embodiment, the first received scan layer datais the scan layer data in the head of the bit stream data.

Next, the received scan layer data is decoded according to a non-zerohistory table so as to obtain the decoded coefficients of the pixels inthe scan layer (step S202). In this step, a run length decoding isperformed to the scan layer data to obtain the decoded coefficients.After that, a signed power of two adjustment is performed to the decodedcoefficients according to a sign table (step S203).

To be specific, in a progressive JPEG image decoding method, thedecoding result of a previous scan layer has to be referred (i.e.whether the decoded coefficients thereof are non-zero?) while decodingthe data of a current scan layer by using a variable length decoding(VLD) apparatus. Thus, in the present embodiment, a non-zero historytable has to be referred while decoding the data of a scan layer, andwhile generating the decoded coefficients of the scan layer, thenon-zero history record of the decoded coefficients has to be recordedto be referred while decoding the data of a next scan layer.

According to another characteristic of progressive image decoding, thesigns of a decoding result at the same address have to be referred inorder to adjust the signs of the decoded coefficients before they areoutput. Thus, in the present invention, besides the non-zero historytable for recording whether the pixels in a scan layer are zeros, a signtable is also required for adjusting the signs of the decodedcoefficients.

Moreover, in the conventional progressive image decoding method, thecomplete image data is recorded in different scan layers, and more imageinformation, accordingly a clearer decoded image, is obtain after thedata of each scan layer is decoded. To be specific, assuming the valueof a pixel consists a plurality of bits and the data of only one or someof these bits is recorded in each scan layer, then the image informationof only one or some bits of the pixel value is obtained after the dataof a scan layer is decoded, and accordingly, an incomplete image isobtained. A clear image can only be obtained while the data of all thescan layers have been decoded and all the bits of the pixels arecombined together. According to the decoding method described above, auser can get to know roughly about the content of an image before thecomplete image is decoded.

As described above, the bit information contained in each scan layer isconstant. Thus, in the present invention, besides referring to the signtable for adding a sign to each decoded coefficient, each decodedcoefficient is multiplied by a power of two according to the position ofthe image data bit corresponding to the current scan layer in a binarysequence in order to obtain the pixel value corresponding to the bit.

For example, assuming a complete pixel value consists 8 bits (recordingpixel values 0˜255), if the bit corresponding to the current scan layeris bit 3 and the bit is not null and is positive (as shown in FIG. 3),then the pixel value obtained accordingly is 2³=8.

After the decoded coefficients of the scan layer are obtained, thenon-zero history table and sign table corresponding to the decodedcoefficients can be further calculated according to the bit informationand the signs of these decoded coefficients (step S204). The non-zerohistory table and sign table corresponding to the decoded coefficientsof the previous scan layer are then updated to those corresponding tothe decoded coefficients of the current scan layer and used for decodingthe data of a next scan layer.

Additionally, the decoded coefficients are output to an external framebuffer to be displayed on a computer screen (step S205). According tothe standard of progressive JPEG image decoding, an inverse quantization(IQ) and an inverse discrete cosine transformation (IDCT) are furtherperformed to these decoded coefficients, and furthermore, these decodedcoefficients may also be converted by using a converter according to therequirement of a user so as to allow the user to get an image ofappropriate size.

Finally, whether or not the currently decoded scan layer is the lastscan layer in the bit stream data is determined (step S206). If thecurrently decoded scan layer is not the last layer in the bit streamdata, which means there is still data of scan layer to be decoded, stepS201 is executed again to decode the data of the next scan layer;otherwise, if the currently decoded scan layer is the last scan layer,which means the data of all the scan layers has been decoded, a completeimage data is obtained after accumulating the decoded coefficients (stepS207).

It should be noted that the decoded coefficients of the next scan layerare also performed with an IQ and an IDCT before they are output andaccumulated to the decoded coefficients output previously, and becausethe accumulated decoded coefficients contain more bits of the imagedata, a displayed image becomes clearer.

In overview, in the present embodiment, through the characteristic thateach scan layer only records a constant bit information of an image, anon-zero history table and a sign table which require only two bits areused for replacing the decoded coefficients of an entire scan layerrecorded originally for subsequent reference. Accordingly, the memoryspace required for recording the decoded coefficients is saved and theimage can be decoded and displayed even with limited memory space.Below, the detailed procedure for recording the non-zero history tableand the sign table will be explained in another embodiment of thepresent invention.

Second Embodiment

In the present embodiment, the encoding/decoding procedures of actualdecoded coefficients are explained. With a decoded coefficient −9 as anexample, −9 is expressed as 11110111 in binary, and as described in theconventional technique, Huffman encoding is performed to the absolutevalue of a coefficient, thus, the absolute value of −9 is obtained as:|−9|=00001001. In the present embodiment, it is assumed that thecoefficient −9 is encoded in four scan layers, the first 5 bits (00001,namely −1) is encoded first, and run length encoding is adopted.

The format of run length encoding is Table(RRRRSSSS)AA(K), wherein K isthe first non-zero value after several zero values, RRRR refers to thezero values before K, SSSS refers to the bit number of K, and AA(K)shows appropriates bits representing K. In addition, RRRRSSSS is an8-bit binary sequence obtained by using RRRR as bits 7˜4 and SSSS asbits 3˜0 of the binary sequence. While encoding, a complement of thecoefficient is encoded if the value of the coefficient is negative.After RRRRSSSS is obtained, a codeword having least bits is obtainedthrough a lookup table, namely, Table(RRRRSSSS), wherein the table is areference table generated according to the occurrence probability ofRRRRSSSS. Next, 0, 0, 1 are sequentially encoded in the second, third,and fourth encoding processes and these values are all attached to thenext non-zero value.

In the step of encoding value −1, the RRRR value corresponding to −1 is0, the SSSS value thereof is 1, and AA(K)=0. Assuming the codewordobtained through lookup table is Table(RRRRSSSS)=1011, then a compressedcode 10110 is obtained by combining foregoing codeword and AA(K), whichis 0.

On the other hand, during Huffman decoding, a run length decoding isperformed to −1 to obtain the binary value thereof (i.e. 11111111).Because the bits corresponding to the current scan layer is bits 7˜3,foregoing decoded value (11111111) has to be shifted 3 bits leftward toobtain (11111000), which represents the value −8, and here a negativesign of the decoded coefficient is recorded in the sign table.

Thereafter, the decoding results of the second and third decodingprocesses are both 0, which means the values are null. The decodingresult of the fourth decoding process is 1, which means the value is notnull, and the binary value of −1 (i.e. 11111111) is then obtainedaccording to the negative sign in the sign table. However, because thebit corresponding to the scan layer in the fourth decoding process isbit 0, the decoded value (11111111) is shifted 0 bit leftward to obtain(111111111), which represents the value −1. The decoded coefficient −9is obtained after adding all the decoded values, which is(11111000)+0+0+(111111111)=(11110111). In short, in the presentembodiment, −9 is transmitted by dividing into −8,0,0 and −1.

As described above, in the progressive JPEG image decoding method of thepresent invention, the signs of the decoded coefficients have to bedetermined according to the sign table besides referring to the non-zerohistory table of the previous scan layer, thus, correct decodedcoefficients can be generated. Moreover, in the present invention, asigned power of two adjustment is performed to each decoded coefficientso that an image can be decoded and displayed correctly.

On the other hand, the present invention further provides a progressiveJPEG image decoding method, wherein the scan layers are divided into aplurality of decoding areas according to the size of a system memory andthese decoding areas are respectively decoded by referring to thenon-zero history table and sign table described above, so that thememory required for decoding an image is considerably reduced. Below, anembodiment of foregoing method will be explained in detail.

Third Embodiment

FIG. 4 is a flowchart illustrating a progressive JPEG image decodingmethod according to a third embodiment of the present invention.Referring to FIG. 4, the progressive JPEG image decoding method in thepresent embodiment is suitable for decoding a bit stream data into animage data, wherein the bit stream data includes the data of a pluralityof scan layers. Below, the decoding method in the present embodimentwill be described in detail.

First, the scan layers are divided into a plurality of decoding areas(step S401). The size of the divided decoding areas is determinedaccording to the capacity of the memory, namely, first the number ofimage blocks can be processed during a decoding process is determinedaccording to the size of the memory, and then the scan layers aredivided into a plurality of decoding areas according to this number.

Next, the decoding areas are sequentially selected as a partial decodingarea (step S402). The scan layers are arranged in a particular order,thus, in the present embodiment, the first received scan layer data isthe scan layer data in the front of the bit stream data.

Thereafter, the data of a scan layer in the bit stream data issequentially received, and the data in the partial decoding area of thescan layer is decoded according to a non-zero history table and a signtable to generate a plurality of local decoded coefficients (step S403).To be specific, a run length decoding is performed to the data of thescan layer according to the non-zero history table to obtain variousdecoded coefficients, and then a signed power of two adjustment isperformed to each decoded coefficient according to the sign table,wherein the detailed decoding method is the same as or similar to thatdescribed in the first embodiment and therefore will not be describedherein.

While generating the local decoded coefficients, the non-zero historytable and the sign table are also updated according to the local decodedcoefficients (step S404). Because in a progressive JPEG image decodingmethod, the decoding result of a previous scan layer has to be referredfor decoding the data of a current scan layer, in the presentembodiment, the local decoded coefficients are replaced by a non-zerohistory table and a sign table for decoding the data of a next scanlayer at the same time when these local decoded coefficients aregenerated.

It should be mentioned that in the present embodiment, while receivingthe data of a scan layer at the beginning, a starting address of thescan layer is first located, and the data of the scan layer is thendecoded from this starting address. In addition, in the presentembodiment, after the data in a partial decoding area of a scan layer isdecoded, the last decoding address in the partial decoding area isrecorded as the starting point for decoding the next partial decodingarea. On the other hand, the last decoding address recorded previouslyis loaded every time before decoding the data in a partial decoding areaof a scan layer, so that the decoding process can be carried out rightafter the previous partial decoding area. As described above, only thelast decoding address is recorded every time after decoding a partialdecoding area, so that it is not necessary to store the starting pointsof all the partial decoding areas in advance, and accordingly lessmemory space is used.

Next, the local decoded coefficients are performed with an IQ and anIDCT and output as part of the image data (step S405), wherein foregoinglocal decoded coefficients may be further converted by a converter, butthe present invention is not limited thereto.

Whether there are data of other scan layers to be decoded is determinedafter the data of a decoding area in a scan layer is decoded and thelocal decoded coefficients are output (step S406). If there is stilldata to be decoded, step S403 is executed again to receive the data inthe same partial decoding area of the next scan layer and decode thedata according to the non-zero history table and the sign table recordedpreviously to generate new local decoded coefficients until the data ofall the partial decoding areas have been decoded. The newly generatedlocal decoded coefficients are output and accumulated to the localdecoded coefficients output previously, and the displayed image becomesclearer because the accumulated decoded coefficients contain more bitinformation of the image.

Finally, whether there are still data of other decoding areas to bedecoded is determined after the data in a decoding area is decoded (stepS407). If there are still data of other decoding areas to be decoded,step S402 is executed again to select the next partial decoding area anddecode the data therein until the data in all the decoding areas havebeen decoded and a complete image data is obtained (step S408).

In the present embodiment, the number of non-zero history tables andsign tables of image blocks that can be stored during a decoding processis determined according to the size of a memory, and the scan layers aredivided into a plurality of decoding areas according to this number. Thedata in the same decoding area of all the scan layers is decoded duringeach decoding process, and the data in a next decoding area of all thescan layers is decoded during the next decoding process. The decodedcoefficients are output first, and a non-zero history table and a signtable are used for decoding the next scan layer. Accordingly, the memoryspace used in the present invention is considerably reduced.

In overview, in the progressive JPEG image decoding method provided bythe present invention, a non-zero history table and a sign table of eachvariable length decoding result are recorded for replacing the decodedcoefficients used in the conventional technique. Thus, in the presentinvention, less memory space is used so that an image can be decoded anddisplayed correctly even with limited memory space.

It will be apparent to those skilled in the art that variousmodifications and variations can be made to the structure of the presentinvention without departing from the scope or spirit of the invention.In view of the foregoing, it is intended that the present inventioncover modifications and variations of this invention provided they fallwithin the scope of the following claims and their equivalents.

1. A progressive JPEG image decoding method suitable for decoding a bitstream data into an image data, the bit stream data comprising data of aplurality of scan layers, the decoding method comprising: a. dividingthe scan layers into a plurality of decoding areas; b. sequentiallyselecting one of the decoding areas as a partial decoding area; c.sequentially receiving the data from one of the scan layers in the bitstream data, decoding the data in the partial decoding area of the scanlayer according to a non-zero history table and a sign table to output aplurality of local decoded coefficients by steps comprising: performinga run length decoding to the data of the scan layer according to thenon-zero history table to obtain the decoded coefficients; andperforming a signed power of two adjustment to the value of each decodedcoefficient according to the sign table, wherein the signed power of twoadjustment comprises: obtaining the sign for the decoded coefficientfrom the sign table; if the sign is positive, performing a power of twoadjustment to the decoded coefficient so as to output the plurality oflocal decoded coefficients; if the sign is negative, performing two'scompliment conversion to the decoded coefficient and then performing apower of two adjustment to the decoded coefficient so as to output theplurality of local decoded coefficients; and updating the non-zerohistory table and the sign table wherein, the non-zero history tablecomprises a first additionally stored table to indicate whether each ofthe plurality of decoded coefficients is zero or not by using an one bitvalue to represent each of the plurality of decoded coefficients, andthe sign table comprises a second additionally stored table to indicatewhether the sign of each of the plurality of decoded coefficients ispositive or negative by using an one bit value to represent the sign ofeach of the plurality of decoded coefficients; d. sequentially receivingthe data from the next scan layer in the bit stream data, repeating stepc, to decode the data in the partial decoding area of the next scanlayer to output the local decoded coefficients, and updating thenon-zero history table and the sign table until the data of all the scanlayers are decoded.
 2. The progressive JPEG image decoding methodaccording to claim 1, wherein step c, comprises: converting the localdecoded coefficients by using a converter and then performing an inversequantization and an inverse DCT to the local decoded coefficients, andoutputting the local decoded coefficients; and accumulating the localdecoded coefficients to the local decoded coefficients outputpreviously.
 3. The progressive JPEG image decoding method according toclaim 1, wherein the size of the decoding areas divided in step a, isdetermined according to the size of a memory and a same dividing methodis adopted for each of the scan layers.
 4. The progressive JPEG imagedecoding method according to claim 1, wherein step c, further comprises:recording a last decoding address of the partial decoding area of thescan layer as a starting point of the partial decoding area of the nextscan layer.
 5. The progressive JPEG image decoding method according toclaim 4, wherein before receiving the data of the scan layer, step c,further comprises: loading the last decoding address of the previousscan layer before decoding the data of the next decoding area of thescan layer; decoding data in the next partial decoding area from thelast decoding address; and decoding data in the partial decoding areasof the scan layers, and outputting the decoded results as part of theimage data.
 6. The progressive JPEG image decoding method according toclaim 5, wherein after step d., the progressive JPEG image decodingmethod further comprising: determining whether or not the data in thedecoding areas of all the scan layers has been decoded; repeating stepsb.˜d, to select the next partial decoding area of the first scan layerand decoding the data in the next partial decoding area until the datain all the decoding areas has been decoded if there is still data in thedecoding area to be decoded, wherein the complete image data is obtainedwhen the data in the decoding areas of all the scan layers in the bitstream data has been decoded.